/*
 * @Author: wangzhichiao<https://github.com/wzc570738205>
 * @Date: 2020-05-27 14:42:33
 * @LastEditors: wangzhichiao<https://github.com/wzc570738205>
 * @LastEditTime: 2020-05-27 15:07:00
 */
import Request from '../common/js/request'

// 认证接口
class DynamicFormsService {
  /**
   * 获取Token
   * @param account 账号、邮箱、手机号
   * @param password 密码
   */
  static getOption(url) {
    return Request.get(url)
  }

  /**
   * 刷新Token
   * @param refreshToken 刷新Token
   */
  static refreshToken(refreshToken) {
    const url = '/api-auth/auth/refreshToken'

    const data = {
      refreshToken
    }

    return Request.post(url, data)
  }
}

export default DynamicFormsService
